Repository navigation
Conversation
Show launchdarkly_ai_server.agui.stream for one config turn: RUN_STARTED, text and tool events, then RUN_FINISHED. The file is standalone so it does not edit the shared example index. Co-authored-by: alexis <alexis@launchdarkly.com>
|
@cursor review |
jeffdupont
left a comment
There was a problem hiding this comment.
Not ready yet: the example can't be run.
examples/agui_stream.py:14-15says it isn't registered inmain.py, and the file has noif __name__ == "__main__"block. Every other example runs through theEXAMPLESdict inmain.py, so nothing callsinit_client()here andpython -m examples.agui_streamjust imports and exits. Fix: add"agui-stream": "examples.agui_stream"tomain.pyand aUsage (via main.py):line to the docstring, likeexamples/streaming.py.
Non-blocking:
TOOL_CALL_ARGSdeltas are empty unlesscapture_contentis on. One docstring line would save users wondering why args are blank.RUN_FINISHEDwithout usage printsUsage: null. Same asstreaming.py, so consistency only.
The API usage itself checks out against main: agui.stream(...) signature and the event field names all match RunReader/TurnEmitter.
…ample-7ca3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds agui-stream to EXAMPLES so python main.py agui-stream runs it, a Usage line in its docstring, and a note that TOOL_CALL_ARGS and TOOL_CALL_RESULT content are empty unless capture_content is on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Replying to the 10-15 review. Pushed two commits:
Lint and typecheck pass. I have not run the example against a live flag. Needs a human reviewer. 🤖 Generated with Claude Code |
jeffdupont
left a comment
There was a problem hiding this comment.
@apucacao, I pushed two commits to your branch on 10-23: 2ab47e4 merges main, and a37eda9 registers agui-stream in main.py and adds the capture_content note to the docstring. Can you confirm those changes are what you want, or revert them if not?
I wrote part of this diff, so I shouldn't be the one to approve it. Once you're happy with it, it needs a review from someone else on the team. CI is green on a37eda9.
🤖 Generated with Claude Code
Adds a standalone example of
launchdarkly_ai_server.agui.streamfor one AI Config turn.config().stream()stayschunkthendone. This file shows the opt-in reader:RUN_STARTED, text and tool events, thenRUN_FINISHED. Text goes to stdout. Run and tool events go to stderr.main.pyand the README layout are unchanged, so this does not collide with another example PR editing that index.run(flag_key, user_input)matches the other examples.